package com.fire.control.system.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;

import com.fire.control.system.statics.Type_Company;
/***
 * 
 * @ClassName:  Company   
 * @Description:公司企业实体   
 * @author:   chenchuang
 * @date:   2017年5月6日 下午2:50:15   
 *
 */
@Entity
@Table(name = "t_company") 
public class Company extends BaseEntity{

	private static final long serialVersionUID = 1L;
	/**   
	 * @Fields companyName : 名称
	 */
	@Column(name = "company_name", nullable = false,length=50)
	private String companyName;
	
	@Column(name = "enable", nullable = false)
	private boolean enable;
	
	/**   
	 * @Fields parentId 
	 */
	@Column(name = "parent_id", nullable = false,length=50)
	private String parentId;
	
	/**   
	 * @Fields contact : 联系人  
	 */ 
	@Column(name = "contact", nullable = false,length=10)
	private String contact;
	/**   
	 * @Fields telNumber : 联系电话 
	 */ 
	@Column(name = "tel_number", nullable = false,length=20)
	private String telNumber;
	/**   
	 * @Fields address : 地址  
	 */ 
	@Column(name = "address", nullable = false,length=50)
	private String address;
	/**   
	 * @Fields email : email
	 */ 
	@Column(name = "email",length=50)
	private String email;

	@Column(name = "company_type", nullable = true,length=20)
	@Enumerated(EnumType.STRING)
	private Type_Company companyType;
	
	@Column(name = "device_type", nullable = true,length=20)
	private String deviceType;
	
	@Column(name = "device_desc",length=50)
	private String deviceDesc;
	
	
	@Column(name = "sign_error_scop",length=50,nullable = true)
	private String signErrorScop;
	
	@Column(name = "province_id",length=50,nullable = true)
	private String provinceId;
	
	@Column(name = "city_id",length=50,nullable = true)
	private String cityId;
	
	@Column(name = "area_id",length=50,nullable = true)
	private String areaId;
	
	public String getContact() {
		return contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

	public String getTelNumber() {
		return telNumber;
	}

	public void setTelNumber(String telNumber) {
		this.telNumber = telNumber;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	
	
	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public Company setCompany(Company c){
		this.address=c.getAddress();
		this.parentId = c.getParentId();
		this.companyName = c.getCompanyName();
		this.contact = c.getContact();
		this.email = c.getEmail();
		this.telNumber = c.getTelNumber();
		this.companyType = c.getCompanyType();
		this.provinceId = c.getProvinceId();
		this.cityId = c.getCityId();
		this.areaId = c.getAreaId();
		this.deviceDesc = c.getDeviceDesc();
		this.deviceType = c.getDeviceType();
		return this;
	}

	public Type_Company getCompanyType() {
		return companyType;
	}

	public void setCompanyType(Type_Company companyType) {
		this.companyType = companyType;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getDeviceType() {
		return deviceType;
	}

	public void setDeviceType(String deviceType) {
		this.deviceType = deviceType;
	}

	public String getDeviceDesc() {
		return deviceDesc;
	}

	public void setDeviceDesc(String deviceDesc) {
		this.deviceDesc = deviceDesc;
	}

	public String getSignErrorScop() {
		return signErrorScop;
	}

	public void setSignErrorScop(String signErrorScop) {
		this.signErrorScop = signErrorScop;
	}

	public boolean isEnable() {
		return enable;
	}

	public void setEnable(boolean enable) {
		this.enable = enable;
	}

	public String getProvinceId() {
		return provinceId;
	}

	public void setProvinceId(String provinceId) {
		this.provinceId = provinceId;
	}

	public String getCityId() {
		return cityId;
	}

	public void setCityId(String cityId) {
		this.cityId = cityId;
	}

	public String getAreaId() {
		return areaId;
	}

	public void setAreaId(String areaId) {
		this.areaId = areaId;
	}
}
